<template>
  <div>son
    <button @click="test">test</button>
  </div>
</template>

<script>
export default {
  name: "Son",
  props: ["msg"],
  emits: ["hello"],
  // 形参
  setup(props, context) {
    console.log(props);
    console.log(context); //直接看看不到，里面的属性值都是proxy对象
    console.log(context.attrs);
    console.log(context.slots);
    function test() {
      context.emit("hello", 25);
    }
    return { test };
  },
};
</script>

<style>
</style>